package com.woniuedu.controller;

import com.woniuedu.entity.Subject;
import com.woniuedu.service.ISubjectService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/subject")
public class SubjectController {
    @Autowired(required = false)
    ISubjectService subjectService;

    @GetMapping("/findAllSubject/{parentId}")
    @ApiOperation(value = "查询全部课程类型")
    public List<Subject> findAllSubject(Subject subject){
        return subjectService.findAllSubject(subject);
    }

}
